package edu.towson.cosc.cosc455.bmoran.compiler;

public class MySemanticAnalyzer {
	public void compare()
	{
		for(int i = 0; i < MyCompiler.parseTree.size();i++)
		{
			MyCompiler.html += convert(MyCompiler.parseTree.get(i));
		}
	}
	/**
	 * converting tokens from lollang to htmllang
	 * @param lolToken
	 * @return
	 */
	public String convert(String lolToken)
	{
		for (int i = 0; i < MyCompiler.compareTokens.get(0).size(); i++)
		{
			if(lolToken.equalsIgnoreCase(MyCompiler.compareTokens.get(0).get(i)))
			{
				return MyCompiler.compareTokens.get(1).get(i);
			}
		}
		
		return lolToken;
	}
}
